package com.daoeping.action;

import com.daoeping.domain.JsonData;
import com.daoeping.domain.OtherData;
import com.daoeping.domain.Usr_user;
import com.daoeping.service.UserService;
import com.opensymphony.xwork2.ActionSupport;

public class CheckExistAction extends ActionSupport{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -658684735612518771L;
	private Usr_user user ;
	private UserService userService;
	private JsonData jsonData;
	private OtherData otherData;
	
	public OtherData getOtherData() {
		return otherData;
	}


	public void setOtherData(OtherData otherData) {
		this.otherData = otherData;
	}


	public JsonData getJsonData() {
		return jsonData;
	}


	public void setJsonData(JsonData jsonData) {
		this.jsonData = jsonData;
	}



	public Usr_user getUser() {
		return user;
	}


	public void setUser(Usr_user user) {
		this.user = user;
	}


	public UserService getUserService() {
		return userService;
	}


	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	public String verifyUserExist(){
		jsonData = new JsonData();
		jsonData.setJsonData(userService.checkUserExist(user));
		return "exist";
	}
	public String verifyCodeExist(){
		jsonData = new JsonData();
		jsonData.setJsonData(userService.checkVerifyCodeExist(otherData));
		return "exist";
	}
	public String verifyPLoginExist(){
		jsonData = new JsonData();
		jsonData.setJsonData(userService.checkUserExist(user));
		return "login";
	}
	public String verifyCLoginExist(){
		jsonData = new JsonData();
		jsonData.setJsonData(userService.checkUserCopExist(user));
		return "login";
	}
	
}
